<?php
include("food_conf.php");
?>
<?php
Session_Start();
$shop_ID = $_SESSION["shop_ID"];
$display = "select * from food where shop_id='$shop_ID'";
$result = mysql_query($display,$conn) or die ("用户数据加载失败: ".mysql_error());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>店家管理</title>
  <style text="text/css">
  td{
  font-size:28px;
  background-color:grey;
  width:280px;
  height:25px}
  body,td,th {
	font-size: 18px;
	color: #FC3;
}
body {
	background-color: #FFF;
	background-image: url(image/%E5%BA%97%E5%AE%B6&%E5%AD%A6%E7%94%9F%E5%90%8E%E5%8F%B0.jpg);
	background-repeat: no-repeat;
}
  a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
  </style>
</head>
<body>
<div align="center">
  <h3>欢迎用户<?php echo $shop_ID;?>进入食堂食物管理系统！</h3>
</div>
<div align="center">
<table bgcolor="#999999">
<tr align="center">
<td>食物编号</td>
<td>食物名</td>
<td>食物价格</td>
<td>食物状态</td>
</tr>
<?php

if ($num = mysql_num_rows($result))
{
	while($row = mysql_fetch_array($result,MYSQL_ASSOC))
	{
?>
<tr>
	<td align="center"><?php echo $row['food_ID'];?></td>
	<td align="center"><?php echo $row['food_name'];?></td>
	<td align="center"><?php echo $row['food_value'];?></td>
    <td align="center"><?php
	if($row['food_state']==1){echo "可售";}
	else {echo "卖完";}
	?></td>
</tr>
<?php
	}
}
mysql_close($conn);
?>
</table>
<div style="position: absolute; width: 101px; left: 955px; top: 22px; background-color: #999999; layer-background-color: #999999; border: 1px none 
#000000; font-weight: bold; color: #FF0; height: 26px;"><a href="shop_update.php?shop_ID=<?php echo $shop_ID;?>">菜单管理</a></div>
<div style="position: absolute; width: 101px; left: 1078px; top: 22px; background-color: #999999; layer-background-color: #999999; border: 1px none 
#000000; font-weight: bold; color: #FF0; height: 26px;">账户管理</div>
</div>
</body>
</html>